<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="f"%>
<%@ taglib uri="/mytag" prefix="yjd"%>
	<div class="h_a">借款信息</div>
	<div class="table_full">
		<table width="100%">
			<tr>
				<th width="100">标题</th>
				<td>
				<c:choose>
					<c:when test="${data.borrowModel.status>=40 }">
					<a target="_blank" href="${FPWEB.frontRootPath }/invest/view/${data.borrowModel.borrow_id }${FPWEB.frontUrlStuff }">${data.borrowModel.title }</a>
					</c:when>
					<c:otherwise>
					${data.borrowModel.title }
					</c:otherwise>
				</c:choose>
				</td>
				<th width="100">产品类别</th>
				<td>${data.borrowModel.strMap.qclass }</td>
				<th width="100">用途</th>
				<td>${data.borrowModel.strMap.yongtu }</td>
			</tr>
			<tr>
				<th>项目编号</th>
				<td>${data.borrowModel.number }</td>
				<th>信用等级</th>
				<td colspan="3">
				<c:if test="${data.creditModel!=null }">
				<img
					src='<yjd:url url="/Images/Credit/${data.creditModel.icon }" type="3"/>' />
				</c:if>
				<c:if test="${data.creditModel==null }">未评级</c:if>
				</td>
			</tr>
			<tr>
				<th>金额</th>
				<td>${data.borrowModel.price }</td>
				<th>年化率</th>
				<td>${data.borrowModel.apr } %</td>
				<th>借款期限</th>
				<td>${data.borrowModel.limit }个月</td>
			</tr>
			<tr>
				<th>还款方式</th>
				<td>${data.borrowModel.strMap.mode }</td>
				<th colspan="3">保障方式</th>
				<td>${data.borrowModel.strMap.safe }</td>
			</tr>
			<tr>
				<th>借款说明</th>
				<td colspan="5">${data.borrowDataModel.content }</td>
			</tr>
			<tr>
				<th>项目状态</th>
				<td colspan="5">${data.borrowModel.strMap.status }</td>
			</tr>
			<c:if test='${data.borrowModel.refuse!=null && data.borrowModel.refuse!="" }'>
			<tr>
			    <th>拒绝码</th>
				<td>${data.borrowModel.refuse }</td>
				<th>拒绝详情</th>
				<td colspan="3">${data.borrowModel.strMap.refuse }</td>
			</tr>
			</c:if>
		</table>
	</div>

	<div class="h_a">审核信息</div>
	<div class="table_full">
		<c:if test="${data.borrowModel.status>=20 || data.borrowModel.status==-1}">
		<table width="100%">
			<c:if test="${data.borrowModel.status>=20 || data.borrowModel.status==-1 }">
		    <tr>
			    <th width="100">初审人员</th>
				<td width="100">${data.borrowDataModel.verify_1_name }</td>
			    <th width="100">审核时间</th>
				<td>${data.borrowDataModel.strMap.verify_1_time }</td>
			</tr>
			<tr>
			    <th>初审结论</th>
				<td colspan="3">${data.borrowDataModel.verify_1_opinion }</td>
			</tr>
			</c:if>
			<c:if test="${data.borrowModel.status>=30 }">
			<tr>
			    <th width="100">复审人员</th>
				<td>${data.borrowDataModel.verify_2_name }</td>
			    <th width="100">审核时间</th>
				<td>${data.borrowDataModel.strMap.verify_2_time }</td>
			</tr>
			<tr>
			    <th width="100">复审结论</th>
				<td colspan="3">${data.borrowDataModel.verify_2_opinion }</td>
			</tr>
			<tr>
			    <th width="100">风控评语</th>
				<td colspan="3"><pre>${data.borrowDataModel.assess }</pre></td>
			</tr>
			</c:if>
			<c:if test="${data.borrowModel.status>=40 }">
			<tr>
			    <th width="100">发标人员</th>
				<td>${data.borrowDataModel.verify_3_name }</td>
			    <th width="100">操作时间</th>
				<td>${data.borrowDataModel.strMap.verify_3_time }</td>
			</tr>
			<tr>
			    <th width="100">发标结论</th>
				<td colspan="3">${data.borrowDataModel.verify_3_opinion }</td>
			</tr>
			</c:if>
			<c:if test="${data.borrowModel.status>=60 }">
			<tr>
			    <th width="100">终审人员</th>
				<td>${data.borrowDataModel.verify_4_name }</td>
			    <th width="100">审核时间</th>
				<td>${data.borrowDataModel.strMap.verify_4_time }</td>
			</tr>
			<tr>
			    <th width="100">终审结论</th>
				<td colspan="3">${data.borrowDataModel.verify_4_opinion }</td>
			</tr>
			</c:if>
		</table>
		</c:if>
	</div>

	<c:if test="${data.borrowModel.status>=20 }">
	<div class="h_a">审核费用</div>
	<div class="table_full">
		<table width="100%">
			<tr>
				<th width="100">担保费用</th>
				<td>${data.borrowCostModel.danbao } 元</td>
			</tr>
			<tr>
				<th>实地审核费用</th>
				<td>${data.borrowCostModel.realaddress } 元</td>
			</tr>
			<tr>
				<th>委托代查费用</th>
				<td>${data.borrowCostModel.entrust } 元</td>
			</tr>
		</table>
	</div>
	<div class="h_a">借款费用</div>
	<div class="table_full">
		<table width="100%">
			<tr>
				<th width="100">借款服务费</th>
				<td>${data.borrowCostModel.services } %</td>
			</tr>
			<tr>
				<th>账户管理费</th>
				<td>${data.borrowCostModel.manage } %</td>
			</tr>
		</table>
	</div>
	</c:if>
	<c:if test="${data.borrowModel.status>=40 }">
	<div class="h_a">投标详情</div>
	<div class="table_full">
		<table width="100%">
			<tr>
				<th width="100">最低投标</th>
				<td>${data.borrowModel.price_invest_min } 元</td>
				<th width="100">最高投标</th>
				<td colspan="3">${data.borrowModel.price_invest_max } 元</td>
			</tr>

			<tr>
				<th>开始时间</th>
				<td>${data.borrowModel.strMap.starttime }</td>
				<th>结束时间</th>
				<td colspan="3">${data.borrowModel.strMap.endtime }</td>
			</tr>
			<tr>
				<th>已投金额</th>
				<td>${data.borrowModel.price_invest }</td>
				<th>投标次数</th>
				<td>${data.borrowModel.tnum } 次</td>
				<th>投标人数</th>
				<td>${data.borrowModel.unum } 人</td>
			</tr>
		</table>
	</div>
	<div class="h_a">门店用户投资数据</div>
	<div class="table_full">
		<table width="100%">
			<tr>
				<th width="100">投资总金额</th>
				<td>${data.dzInvestTotalPriceStr } 元</td>
				<th width="100">投资金额占比</th>
				<td>${data.dzInvestTotalPriceRateStr } %</td>
			</tr>
			<tr>
				<th>投标次数</th>
				<td>${data.dzInvestTnum } 次</td>
				<th>投标人数</th>
				<td>${data.dzInvestUnum } 人</td>
			</tr>
		</table>
	</div>
	<div class="table_list">
		<table width="100%">
			<thead>
				<tr>
					<td width="60">序号</td>
					<td>会员</td>
					<td>手机</td>
					<td>金额</td>
					<td>红包</td>
					<td>充值券</td>
					<td>时间</td>
					<td>投标方式</td>
				</tr>
			</thead>
			<tbody>
				<c:forEach items="${data.investModels }" var="item" varStatus="vs">
				<tr>
					<td>${vs.index+1 }</td>
					<td>${data.userMap[item.user_id].username }</td>
					<td>${data.userMap[item.user_id].mobile }</td>
					<td>${item.price }</td>
					<td>${item.reward }</td>
					<td>${item.volume }</td>
					<td>${item.strMap.addtime }</td>
					<td>${item.strMap.channel }</td>
				</tr>
				</c:forEach>
			</tbody>
		</table>
	</div>
	</c:if>
	<c:if test="${data.borrowModel.status>=60 }">
	<div class="h_a">还款状态</div>
	<div class="table_full">
		<table width="100%">
			<tr>
				<th width="100">欠款金额：</th>
				<td>${data.borrowModel.price_arrears }</td>
				<th width="100">已还金额：</th>
				<td>${data.borrowModel.price_arrears_re }</td>
			</tr>
		</table>
	</div>
	<div class="table_list">
		<table width="100%">
			<thead>
				<tr>
					<td width="60">序号</td>
					<td>金额</td>
					<td>还款日</td>
					<td>实际还款日</td>
					<td>状态</td>
				</tr>
			</thead>
			<tbody>
				<c:forEach items="${data.arrearsFormModels }" var="item" varStatus="vs">
				<tr>
					<td>${vs.index+1 }</td>
					<td>${item.price }</td>
					<td>${item.strMap.reday }</td>
					<td>${item.strMap.actualRetime2!=null?item.strMap.actualRetime2:"-" }</td>
					<td><font color="green">${item.strMap.status }</font></td>
				</tr>
				</c:forEach>
			</tbody>
		</table>
	</div>
	<!-- 债权转让记录 -->
	<div class="h_a">债权转让记录</div>
	<div class="table_list">
		<table width="100%">
			<thead>
				<tr>
					<td>序号</td>
					<td>ID</td>
					<td>转出人</td>
					<td>购买人</td>
					<td>待收本息(元)</td>
					<td>债权公允价值(元)</td>
					<td>转让价格(元)</td>
					<td>管理费(元)</td>
					<td>折让金(元)</td>
					<td>开始日期</td>
					<td>成交日期</td>
				</tr>
			</thead>
			<tbody>
			   <c:forEach items="${data.creditorTransfers  }" var="item" varStatus="vs">
				<tr>
					<td>${vs.index+1 }</td>
					<td>${item.creditor_id }</td>
					<td>
						<ul class="single_list cc">
							<li>${data.userMap[item.user_id].username }</li>
							<li>${data.userIdcardMap[item.user_id].idname }</li>
							<li>${data.userMap[item.user_id].mobile } ${data.mobileDataMap[data.userMap[item.user_id].mobile] }</li>
						</ul>
					</td>
					<td>
						<ul class="single_list cc">
							<li>${data.userMap[item.buy_user_id].username }</li>
							<li>${data.userIdcardMap[item.buy_user_id].idname }</li>
							<li>${data.userMap[item.buy_user_id].mobile } ${data.mobileDataMap[data.userMap[item.buy_user_id].mobile] }</li>
						</ul>
					</td>
					<td>${item.recovery }</td>
					<td>${item.value }</td>
					<td>${item.price }</td>
					<td>${item.manage }</td>
					<td>${item.discount }</td>
					<td>${item.strMap.transferstarttime }</td>
					<td>${item.strMap.oktime }</td>
				</tr>
			</c:forEach>
			</tbody>
		</table>
	</div>
	</c:if>